export default [
  // 权限路由
  {
    path: '/',
    redirect: '/technician',
    hidden: true // 是否展示在侧边栏的菜单里
  },
  //  技师管理
  {
    path: '/technician',
    component: 'Layout',
    redirect: '/technician/list',
    meta: {
      menuName: 'Technician',
      icon: 'icon-jishi',
      subNavName: [{
        name: 'TechnicianManage',
        url: [{
          name: 'TechnicianManage',
          url: '/technician/list'
        }]
      }]
    },
    children: [{
      path: 'list',
      name: 'TechnicianManage',
      component: '/technician/list',
      meta: {
        keepAlive: true,
        title: 'TechnicianManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'TechnicianManage',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'edit',
      name: 'TechnicianEdit',
      component: '/technician/edit',
      meta: {
        keepAlive: false,
        title: 'TechnicianManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'TechnicianEdit',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  //  订单管理
  {
    path: '/shop',
    component: 'Layout',
    redirect: '/shop/order',
    meta: {
      menuName: 'Shop',
      icon: 'icon-dingdanguanli',
      subNavName: [{
        name: 'ShopOrderManage',
        url: [{
          name: 'ShopOrder',
          url: '/shop/order'
        },
        {
          name: 'ShopRefund',
          url: '/shop/refund'
        }]
      }, {
        name: 'ShopEvaluate',
        url: [{
          name: 'ShopEvaluate',
          url: '/shop/evaluate/list'
        }]
      }]
    },
    children: [{
      path: 'order',
      name: 'ShopOrder',
      component: '/shop/order/list',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopOrder',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'order/detail',
      name: 'ShopOrderDetail',
      component: '/shop/order/detail',
      meta: {
        keepAlive: false,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopOrderDetail',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'refund',
      name: 'ShopRefund',
      component: '/shop/refund/list',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopRefund',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'evaluate/list',
      name: 'ShopEvaluate',
      component: '/shop/evaluate/list',
      meta: {
        keepAlive: true,
        title: 'ShopOrderManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopEvaluate',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  //  财务管理
  {
    path: '/finance',
    component: 'Layout',
    redirect: '/finance/list2',
    meta: {
      menuName: 'Finance',
      icon: 'icon-caiwu',
      subNavName: [{
        name: 'FinanceManage',
        url: [{
          name: 'ShopCommissionList',
          url: '/finance/list2'
        }, {
          name: 'FinanceRecord',
          url: '/finance/record'
        }]
      }]
    },
    children: [{
      path: 'record',
      name: 'FinanceRecord',
      component: '/finance/finance/record',
      meta: {
        keepAlive: false,
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'FinanceRecord',
          index: 0,
          auth: ['view']
        }]
      }
    }, {
      path: 'list2',
      name: 'ShopCommissionList',
      component: '/finance/finance/list2',
      meta: {
        keepAlive: true,
        title: 'FinanceManage',
        auth: [],
        isOnly: false,
        pagePermission: [{
          title: 'ShopCommissionList',
          index: 0,
          auth: ['view']
        }]
      }
    }]
  },
  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]
